package com.aspose.cells;

import java.util.Iterator;

public class DxfCollection extends CollectionBase {
   private WorksheetCollection b;

   DxfCollection(WorksheetCollection sheets) {
      this.b = sheets;
   }

   void a() {
      for(int var1 = 0; var1 < this.b.getCount(); ++var1) {
         Worksheet var2 = this.b.get(var1);
         if (var2.m != null) {
            for(int var3 = 0; var3 < var2.getConditionalFormattings().getCount(); ++var3) {
               FormatConditionCollection var4 = var2.getConditionalFormattings().get(var3);

               for(int var5 = 0; var5 < var4.getCount(); ++var5) {
                  FormatCondition var6 = var4.get(var5);
                  Style var7 = var6.f;
                  if (var7 != null) {
                     var6.a(this.a(var7));
                  }
               }
            }
         }

         if (var2.hasAutofilter()) {
            DataSorter var8 = var2.getAutoFilter().b;
            if (var8 != null && var8.a().size() > 0) {
               Iterator var9 = var8.a().iterator();

               while(var9.hasNext()) {
                  zql var10 = (zql)var9.next();
                  switch(var10.d()) {
                  case 1:
                     if (var10.j() != null) {
                        var10.d(this.a(var10.j()));
                     }
                     break;
                  case 2:
                     if (var10.k() != null) {
                        var10.d(this.a(var10.k()));
                     }
                  }
               }
            }
         }
      }

   }

   int a(Style var1) {
      if (var1.e() == this.b) {
         for(int var2 = 0; var2 < this.a.size(); ++var2) {
            Style var3 = (Style)this.a.get(var2);
            if (var1 == var3 || var1.h() == var3.h() && var1.b(var3)) {
               return var2;
            }
         }
      }

      Style var4 = new Style(this.b);
      var4.copy(var1);
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var4);
      return this.a.size() - 1;
   }

   int b(Style var1) {
      com.aspose.cells.b.a.a.ze.a(this.a, (Object)var1);
      return this.getCount() - 1;
   }

   public Style get(int index) {
      return (Style)this.a.get(index);
   }
}
